/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.base.entity;

import com.fasterxml.jackson.annotation.JsonBackReference;
import org.hibernate.validator.constraints.Length;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 商品分组Entity
 * @author alex
 * @version 2017-05-04
 */
public class BaProductType extends DataEntity<BaProductType> {
	
	private static final long serialVersionUID = 1L;
	private BaProductType parent;		// 父级编号
	private String parentIds;		// 所有父级编号
	private String name;		// 分组名称
	private String sort;		// 排序
	private String createName;		// 创建人
	private String updateName;		// 更新人
	
	public BaProductType() {
		super();
	}

	public BaProductType(String id){
		super(id);
	}

	@JsonBackReference
	public BaProductType getParent() {
		return parent;
	}

	public void setParent(BaProductType parent) {
		this.parent = parent;
	}
	
	@Length(min=0, max=1000, message="所有父级编号长度必须介于 0 和 1000 之间")
	public String getParentIds() {
		return parentIds;
	}

	public void setParentIds(String parentIds) {
		this.parentIds = parentIds;
	}
	
	@Length(min=0, max=50, message="分组名称长度必须介于 0 和 50 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=0, max=11, message="排序长度必须介于 0 和 11 之间")
	public String getSort() {
		return sort;
	}

	public void setSort(String sort) {
		this.sort = sort;
	}
	
	@Length(min=0, max=30, message="创建人长度必须介于 0 和 30 之间")
	public String getCreateName() {
		return createName;
	}

	public void setCreateName(String createName) {
		this.createName = createName;
	}
	
	@Length(min=0, max=30, message="更新人长度必须介于 0 和 30 之间")
	public String getUpdateName() {
		return updateName;
	}

	public void setUpdateName(String updateName) {
		this.updateName = updateName;
	}
	
}